package org.nanotek.spring.service;

import java.util.List;

import org.nanotek.beans.ArtistCredit;
import org.nanotek.beans.ArtistCreditName;
import org.nanotek.beans.ArtistName;
import org.nanotek.beans.Release;
import org.nanotek.beans.ReleaseGroup;
import org.nanotek.beans.Track;
import org.nanotek.dao.spring.ArtistCreditDAO;
import org.nanotek.dao.spring.ArtistCreditNameDAO;
import org.nanotek.dao.spring.ArtistNameDAO;
import org.nanotek.dao.spring.ReleaseDAO;
import org.nanotek.dao.spring.ReleaseGroupDAO;
import org.nanotek.dao.spring.TrackDAO;

public class ArtistDAOWrapper {

	
	private ArtistNameDAO <ArtistName> artistNameDAO  = null;;
	
	private ArtistCreditDAO<ArtistCredit> artistCreditDAO = null;
	
	private ArtistCreditNameDAO<ArtistCreditName> artistCreditNameDAO = null;
	
	private ReleaseDAO<Release> releaseDAO = null;
	
	private TrackDAO<Track> trackDAO = null; 
	
	private ReleaseGroupDAO<ReleaseGroup> releaseGroupDAO = null;
	
	
	public List<?> findByName(String value) {
		return artistNameDAO.findByName(value);
	}

	public List<?> findByName(String value, boolean normalize) {
		return artistNameDAO.findByName(value, normalize);
	}

	public List<ArtistCredit> findArtistCreditByArtist(ArtistName artistName) {
		return artistCreditDAO.findArtistCreditByArtist(artistName);
	}

	public List<ArtistCredit> findCreditsByArtistCreditName(
			ArtistCreditName artistCreditName) {
		return artistCreditDAO.findCreditsByArtistCreditName(artistCreditName);
	}

	public List<ArtistCreditName> findArtistCreditNameByArtistNameId(
			Long artistNameId) {
		return artistCreditNameDAO
				.findArtistCreditNameByArtistNameId(artistNameId);
	}

	public List<Release> findReleaseByArtistCredit(ArtistCredit artistCredit) {
		return releaseDAO.findReleaseByArtistCredit(artistCredit);
	}

	public <A extends ArtistCredit> List<Track> findTrackByArtistCredit(
			A artistCredit) {
		return trackDAO.findTrackByArtistCredit(artistCredit);
	}

	
	public <A extends ArtistCredit> List<ReleaseGroup> findReleaseGroupByArtistCredit(
			A release) {
		return releaseGroupDAO.findReleaseGroupByArtistCredit(release);
	}

	public ArtistNameDAO<ArtistName> getArtistNameDAO() {
		return artistNameDAO;
	}

	public void setArtistNameDAO(ArtistNameDAO<ArtistName> artistNameDAO) {
		this.artistNameDAO = artistNameDAO;
	}
	
	public ArtistCreditDAO<ArtistCredit> getArtistCreditDAO() {
		return artistCreditDAO;
	}

	public void setArtistCreditDAO(ArtistCreditDAO<ArtistCredit> artistCreditDAO) {
		this.artistCreditDAO = artistCreditDAO;
	}
	
	public ArtistCreditNameDAO<ArtistCreditName> getArtistCreditNameDAO() {
		return artistCreditNameDAO;
	}

	public void setArtistCreditNameDAO(ArtistCreditNameDAO<ArtistCreditName> artistCreditNameDAO) {
		this.artistCreditNameDAO = artistCreditNameDAO;
	}
	
	public ReleaseDAO<Release> getReleaseDAO() {
		return releaseDAO;
	}

	public void setReleaseDAO(ReleaseDAO<Release> releaseDAO) {
		this.releaseDAO = releaseDAO;
	}

	public TrackDAO<Track> getTrackDAO() {
		return trackDAO;
	}

	public void setTrackDAO(TrackDAO<Track> trackDAO) {
		this.trackDAO = trackDAO;
	}
	
	public ReleaseGroupDAO<ReleaseGroup> getReleaseGroupDAO() {
		return releaseGroupDAO;
	}

	public void setReleaseGroupDAO(ReleaseGroupDAO<ReleaseGroup> releaseGroupDAO) {
		this.releaseGroupDAO = releaseGroupDAO;
	}
}
